﻿using System;
using System.Collections;
using System.Collections.Generic;
using BLL;
using Model;

public partial class ProductRepair_ManageRepair_PackageProductSNModify : System.Web.UI.Page
{
    private PackageSNChange psc;

    public ProductRepair_ManageRepair_PackageProductSNModify()
    {
        psc = new PackageSNChange();
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        string packageProductSN = this.TextBox6.Text.Trim();
        string oldPackageProductSN = this.TextBox1.Text.Trim();
        PackageSNChangeInfo psci = new PackageSNChangeInfo { PackageProductSN = packageProductSN, OldPackageProductSN = oldPackageProductSN, RecordTime = DateTime.Now, UserID = User.Identity.Name };
        string result = psc.InsertRecord(psci);
        ClientScript.RegisterStartupScript(ClientScript.GetType(), "", "<script>alert('" + result + "');</script>");
    }

    protected void Button3_Click(object sender, EventArgs e)
    {
        string packageProductSN = this.TextBox3.Text.Trim();
        this.GridView1.DataSource = psc.GetPackageSNChangebySN(packageProductSN);
        this.GridView1.DataBind();
    }
}
